import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import { BrowserRouter, Route, Routes } from "react-router";
import "./index.css";

import HomeView from "./routes";
import AboutView from "./routes/about";
import CommonLayout from "./layout/CommonLayout";
import ChatTextView from "./routes/chat/text";
import ChatVoiceView from "./routes/chat/voice";

// biome-ignore lint/style/noNonNullAssertion: <explanation>
createRoot(document.getElementById("root")!).render(
  <StrictMode>
    <BrowserRouter>
      <Routes>
        <Route element={<CommonLayout />}>
          <Route index element={<HomeView />} />
          <Route path="about" element={<AboutView />} />
          <Route path="chat/text" element={<ChatTextView />} />
          <Route path="chat/voice" element={<ChatVoiceView />} />
        </Route>
      </Routes>
    </BrowserRouter>
  </StrictMode>,
);
